import {defineConfig} from 'vite';
import vue from '@vitejs/plugin-vue';
import * as path from 'node:path';

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [vue()],
    base: './',
    resolve: {
        alias: {
            '@': path.resolve(__dirname, 'src')
        }
    },
    server: {
        port: 80,
        proxy: {
            '/api': {
                target: 'http://120.77.9.217:9000/v2-api',
                changeOrigin: true,
                rewrite: path => path.replace(/^\/api/, '')
            }
        }
    }
});
